package fule.com.webviewdemo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import fule.com.webviewdemo.R;

public class MainActivity extends AppCompatActivity {
    private Button btn_tv;
    private Button btn_webView;
    private Button btn_rv;
    private Button btn_shop;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        btn_tv = findViewById(R.id.btn_textView);
        btn_webView = findViewById(R.id.btn_webView);
        btn_rv = findViewById(R.id.btn_rv);
        btn_shop= findViewById(R.id.btn_shop);

        btn_tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,TextViewForHtmlActivity.class));
            }
        });

        btn_webView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,WebViewActivity.class));
            }
        });

        btn_rv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,RecycleViewForHtmlActivity.class));
            }
        });
        btn_shop.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this,ShopDetailActivity.class));
            }
        });

    }


}
